&ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12
&ANALYZE-RESUME
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Procedure 
/*------------------------------------------------------------------------
    File        : 
    Purpose     :

    Syntax      :

    Description :

    Author(s)   :
    Created     :
    Notes       :
  ----------------------------------------------------------------------*/
/*          This .W file was created with the Progress AppBuilder.      */
/*----------------------------------------------------------------------*/

/* ***************************  Definitions  ************************** */

DEF INPUT  PARAMETER p-ident   AS       CHARACTER.
DEF INPUT  PARAMETER p-nompar  AS       CHARACTER.
DEF OUTPUT PARAMETER p-valpar  AS       CHARACTER.

DEF VAR buf-nomfile AS  CHARACTER    NO-UNDO.

DEF TEMP-TABLE TT-param NO-UNDO
    FIELD nom  AS    CHARACTER
    FIELD valeur  AS    CHARACTER
    INDEX key1 nom.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME


&ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK 

/* ********************  Preprocessor Definitions  ******************** */

&Scoped-define PROCEDURE-TYPE Procedure
&Scoped-define DB-AWARE no



/* _UIB-PREPROCESSOR-BLOCK-END */
&ANALYZE-RESUME



/* *********************** Procedure Settings ************************ */

&ANALYZE-SUSPEND _PROCEDURE-SETTINGS
/* Settings for THIS-PROCEDURE
   Type: Procedure
   Allow: 
   Frames: 0
   Add Fields to: Neither
   Other Settings: CODE-ONLY COMPILE
 */
&ANALYZE-RESUME _END-PROCEDURE-SETTINGS

/* *************************  Create Window  ************************** */

&ANALYZE-SUSPEND _CREATE-WINDOW
/* DESIGN Window definition (used by the UIB) 
  CREATE WINDOW Procedure ASSIGN
         HEIGHT             = 15
         WIDTH              = 60.
/* END WINDOW DEFINITION */
                                                                        */
&ANALYZE-RESUME

 


&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure 


/* ***************************  Main Block  *************************** */

buf-nomfile  = "/user/wrk/" + p-ident + ".dat".

IF SEARCH(buf-nomfile) <> ? THEN DO:
   INPUT FROM VALUE(buf-nomfile).
   REPEAT:
      CREATE TT-param.
      IMPORT DELIMITER ":" TT-param.
   END.
   INPUT CLOSE.
END.

FIND FIRST TT-param WHERE TT-param.nom = p-nompar NO-ERROR.
IF AVAILABLE TT-param THEN p-valpar = TT-param.valeur.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME


